import { defineComponent } from 'vue';
import { ElConfigProvider } from "element-plus";
import { RouterView } from 'vue-router';
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { useVariableStore } from './store/modules/variable';
import Loading from './components/Loading';


export default defineComponent({
    setup() {

        const variableStore = useVariableStore()

        return () => (<>
            <ElConfigProvider locale={zhCn} size="large">
                <RouterView />
            </ElConfigProvider>

            {/* 全局加载组件 */}
            <Loading show={variableStore.loading.show} context={variableStore.loading.title} />
        </>);
    }
})